import { createApp } from "vue";
import router from "./router/index.ts";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import App from "./App.vue";
//全局注册component组件
// import mUI from "./components/index.ts";
import mUI from "../lib/index.es.js";
import "../lib/style.css";
// //单独引入组件
// import chooseIcon from "../lib/chooseIcon/index.mjs";
// import "../lib/chooseIcon/style.css";
//mock
import "./mock";

// import { toLine } from "./utils/index.ts";
//引入element-plus图标
// import * as ElementPlusIconsVue from "@element-plus/icons-vue";

//全局注册element-plus图标
const app = createApp(App);
// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//   let comName = `el-icon${toLine(key)}`;
//   app.component(comName, component);
// }
//如果是按需导入 components的 组件
// import chooseIcon from "@/components/chooseIcon";
// app.use(chooseIcon);
app.use(router).use(ElementPlus).use(mUI);

app.mount("#app");
